package com.msteam.extra.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.msteam.extra.generator.Display;
import com.msteam.extra.model.base.BaseModel;

import lombok.JFinalModel;

@JFinalModel
@Entity
@Display("明细表")
@Table(name = "TABLE_DETAIL")
public class DetailModel extends BaseModel<DetailModel>{
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="ID")
	@Display("编号")
	private Long id;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARENT_ID")
	@Display("主对象")
	private MasterModel parent;
	
	@Column(name="DETAIL_TITLE")
	@Display("标题")
	private String detailTitle;
}
